export const flightColumns = [
    {prop: 'flno', label: '航班号', minWidth: 90, sortable: true, align: 'center'}, // √
    {prop: 'cnnm', label: '航空公司', minWidth: 80, align: 'center'},
    {
        prop: 'fptt',
        label: 'STD',
        minWidth: 80,
        sortable: true,
        align: 'center',
        formatter(row: any, column: any, cellValue: any) {
            if (cellValue && cellValue.trim() != '') {
                const time = new Date(cellValue);
                // 获取时间
                const hour = time.getHours();
                const minute = time.getMinutes();
                // 格式化时间
                return `${hour}:${minute}`;
            } else {
                return "-"
            }
        }
    },
    {
        prop: 'fplt',
        label: 'ETD',
        sortable: true,
        minWidth: 80,
        align: 'center',
        formatter(row: any, column: any, cellValue: any) {
            if (cellValue && cellValue.trim() != '') {
                const time = new Date(cellValue);
                // 获取时间
                const hour = time.getHours();
                const minute = time.getMinutes();
                // 格式化时间
                return `${hour}:${minute}`;
            } else {
                return "-"
            }
        }
    },
    {
        prop: 'frtt',
        label: 'ATD',
        sortable: true,
        minWidth: 80,
        align: 'center',
        formatter: function (row: any, column: any, cellValue: any) {
            if (cellValue && cellValue.trim() != '') {
                const time = new Date(cellValue);
                // 获取时间
                const hour = time.getHours();
                const minute = time.getMinutes();
                // 格式化时间
                return `${hour}:${minute}`;
            } else {
                return "-"
            }
        }
    },
    {prop: 'ckno', label: '值机柜台', sortable: true, minWidth: 110, align: 'center'},
    {prop: 'stno', label: '停机位', sortable: true, minWidth: 90, align: 'center'},
    {prop: 'dcode', label: '登机口', sortable: true, minWidth: 90, align: 'center'},
    {prop: 'stat', label: '状态', sortable: true, minWidth: 90, align: 'center'}
]

export const flightColumns2 = [
    {prop: 'flno', label: '航班号', sortable: true, minWidth: 90, align: 'center'},
    {prop: 'cnnm', label: '航空公司', minWidth: 80, sortable: false, align: 'center'},
    {
        prop: 'fptt',
        label: 'STA',
        sortable: true,
        minWidth: 80,
        align: 'center',
        formatter(row: any, column: any, cellValue: any) {
            if (cellValue && cellValue.trim() != '') {
                const time = new Date(cellValue);
                // 获取时间
                const hour = time.getHours();
                const minute = time.getMinutes();
                // 格式化时间
                return `${hour}:${minute}`;
            } else {
                return "-"
            }
        }
    },
    {
        prop: 'fplt',
        label: 'ETA',
        sortable: true,
        minWidth: 80,
        align: 'center',
        formatter(row: any, column: any, cellValue: any) {
            if (cellValue && cellValue.trim() != '') {
                const time = new Date(cellValue);
                // 获取时间
                const hour = time.getHours();
                const minute = time.getMinutes();
                // 格式化时间
                return `${hour}:${minute}`;
            } else {
                return "-"
            }
        }
    },
    {
        prop: 'frtt',
        label: 'ATA',
        sortable: true,
        minWidth: 80,
        align: 'center',
        formatter(row: any, column: any, cellValue: any) {
            if (cellValue && cellValue.trim() != '') {
                const time = new Date(cellValue);
                // 获取时间
                const hour = time.getHours();
                const minute = time.getMinutes();
                // 格式化时间
                return `${hour}:${minute}`;
            } else {
                return "-"
            }
        }
    },
    {prop: 'stno', label: '停机位', sortable: true, minWidth: 90, align: 'center'},
    {prop: 'dcode', label: '行李提取转盘', sortable: true, minWidth: 140, align: 'center'},
    {prop: 'stat', label: '状态', minWidth: 80, sortable: true, align: 'center'}
]

